﻿using Microsoft.AspNetCore.Hosting;
using PhotoGallery.Repositories;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.EntityFrameworkCore;
namespace PhotoGallery.Models
{
    public class AlbumCollection
    {
        //private IHostingEnvironment _environment;
        private List<AlbumInfoModel> _albumsList = null;
        
        //public AlbumCollection(List<Album> list)
        //{
        //    _albumsList = list;
        //}
        /// <summary>
        /// 相册集合
        /// </summary>
        public List<AlbumInfoModel> Albums
        {
            get { return _albumsList; }
            set { _albumsList = value; }
        }



        /// <summary>
        /// 排序
        /// </summary>
        public void Sort()
        {
            _albumsList = _albumsList.OrderBy(a => a.Name).ToList();
        }

       
        
    }
}
